/*--------------------------------------------------------------------------------------*\
**
** puzzle_window.h
**
** Heroes IV
** Copyright 2000, The 3DO Company
**
\*--------------------------------------------------------------------------------------*/

#ifndef PUZZLE_WINDOW_H_INCLUDED
#define PUZZLE_WINDOW_H_INCLUDED

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

// kill the 255+ character identifier warning.  Templates tend to exceed that easily.
#pragma warning( disable: 4786 )

#include "bitmap_group_ptr.h"
#include "bitmap_group_cache.h"
#include "bitmap_group_window.h"
#include "bitmap_layer_cache_window.h"
#include "button.h"
#include "game_window.h"

class t_adventure_frame;
class t_adventure_map;
class t_adventure_treasure_map;
class t_army;
class t_blended_bitmap_window;
class t_button;
class t_idle_processor;
class t_player;
class t_text_window;
class t_toggle_button;
class t_town;
enum t_obelisk_color;

class t_puzzle_window : public t_window
{
public:
	t_puzzle_window( t_window* parent, t_adventure_frame* map_ptr, t_player * player_ptr, int selected_obelisk = -1 );
	~t_puzzle_window();
	void        on_idle();

protected:
    t_adventure_frame *         m_adventure_frame_ptr;
	t_bitmap_group_ptr		    m_background_bitmaps_ptr;
	int                         m_fading;
	t_idle_processor*			m_fader;
    t_adventure_map *           m_map_ptr;
	t_bitmap_group_ptr		    m_puzzle_bitmaps_ptr;
    std::vector <t_window_ptr>  m_puzzle_pieces;
    std::vector <t_blended_bitmap_window *>  m_puzzle_cover_pieces;
	t_player *			        m_player_ptr;
    t_obelisk_color             m_selected_color;
	t_town *			        m_town;
    t_adventure_treasure_map *  m_treasure_map_window_ptr;
	t_text_window*              m_visit_text_window_ptr;

    void    close_click( t_button *button_ptr );
    void    display_artifact_location();
    void    obelisk_clicked( t_button *button_ptr, t_obelisk_color color );
    void    reveal_picture ( int number_of_pieces_to_reveal, int *order = NULL );
};
#endif //PUZZLE_WINDOW_H_INCLUDED
